package top.kaoshanji.p1ch02d.main;

import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

/**
 * @author kaoshanji
 * ^_^
 * create time 2025/4/27 16:22
 */
@Component
public class Parrot {

    private String name;

    /**
     * 代码清单-p1ch02d-39页a：使用@PostConstruct管理创建的实例
     */
    @PostConstruct
    public void init() {
        this.name = "Kiki";
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
